package com.bridgeintelligent.tag.customer.mapper;

import com.bridgeintelligent.tag.customer.model.CustomerModel;
import com.bridgeintelligent.tag.customer.track.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;


@Mapper
public interface TrackMapper {

    void addTrack(TrackInfo trackInfo);

    TrackInfo findById(@Param("id") String id);

    TrackInfo findByCustomerId(@Param("customerId") String customerId);

    void delById(@Param("id") String id, @Param("updateTime") String updateTime);

    void delReal(@Param("id") String id);

    void delData(@Param("trackId") String trackId);

    String findMaxDate(@Param("id") String id);

    String findDimName(@Param("dimId") String dimId);

    List<TrackInfo> findList(
            @Param("customerName") String customerName,
            @Param("timeType") String timeType,
            @Param("trackCycle") String trackCycle,
            @Param("trackUptStartTime") String trackUptStartTime,
            @Param("trackUptEndTime") String trackUptEndTime,
            @Param("createStartTime") String createStartTime,
            @Param("createEndTime") String createEndTime,
            @Param("createId") String createId,
            @Param("nowTime") String nowTime
    );

    List<TrackData> findDataByTrackId(
            @Param("trackId") String trackId,
            @Param("dimId") String dimId,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime,
            @Param("customs") List customs
    );

    DimModel findClassifyByDimId(@Param("dimId") String dimId);

    List<ItemModel> findItemByDimId(@Param("dimId") String dimId);

    List<CustomerModel> trackCustomerList(@Param("indexId") String indexId, @Param("customerName") String customerName, @Param("userId") String userId, @Param("list") List list);

    List<String> withoutCustomerList(@Param("indexId") String indexId,@Param("userId") String userId);

    List<String> useCustomerId(@Param("id") String id, @Param("userId") String userId);

    List<TimeModel> getTimes(@Param("indexId") String indexId);

    List<DataModel> computTotal(
            @Param("trackId") String trackId,
            @Param("dimId") String dimId,
            @Param("trackStartTime") String trackStartTime,
            @Param("trackEndTime") String trackEndTime,
            @Param("type") String type);

    List<TrackData> custTotal(
            @Param("trackId") String trackId,
            @Param("param1") String param1,
            @Param("param2") String param2,
            @Param("trackStartTime") String trackStartTime,
            @Param("trackEndTime") String trackEndTime
    );

}